package com.example.design.observer;

import org.junit.Test;

public class TObserver {
    @Test
    public void test() {
        var teacher = new Teacher();
        var student1 = new Student("小明");
        var student2 = new Student("张三");


        teacher.addObserver(student1);
        teacher.addObserver(student2);

        teacher.go2TeacherRoom();
    }
}
